package com.mijie.homi.dao.message;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.mijie.core.IBatisDao;
import com.mijie.homi.common.domain.SystemMessage;

@Repository
public class SystemMessageDao extends IBatisDao{

	public SystemMessage getSystemMessage(int id){
		return this.selectOne("getSystemMessage", id);
	}
	
	public int createSystemMessage(SystemMessage msg){
		this.insert("createSystemMessage", msg);
		return msg.getId()==null?0:msg.getId();
	}
	
	public List<SystemMessage> getSystemMsg4User(int systemMsgMark){
		return this.selectList("getSystemMsg4User", systemMsgMark);
	}
	
	public int getMaxSysMsgId(){
		return this.selectInteger("getMaxSysMsgId");
	}
}
